<style type="text/css">
    .bg {
        background: #fff;
        padding-top: 48px;
        padding-bottom: 10px;
    }
    .transferIntForm{
        border-top: 6px solid #eee;
        padding: 16px 20px;
    }
    .tr_form_group{
        height: 38px;
        line-height: 38px;
        font-size: 12.8px;
        color: #666;
        border-bottom: 1px solid #eeeeee;
        position: relative;
    }
    .tr_form_group input{
        background: transparent;
    }
    .transferIntForm p{
        height: 38px;
        line-height: 38px;
        border-bottom: 1px solid #eeeeee;
    }
    .red{
        color: red;
    }
    .tr_form_group span.lf{
        width: 30%;
        color: #333;
    }
    .confirm_btn,.transfer_record_link{
        display: block;
        width: 100%;
        height: 32px;
        line-height: 32px;
        color: #fff;
        background: #ff6936;
        border:none;
        border-radius: 4px;
        margin-top: 14px;text-align: center;
        font-size: 12.8px;
    }
    .transfer_record_link{
        background: #e3cb05;
    }
    .file_input{
        font-size: 12.8px;
        color: #999;
        position: relative;
        overflow: hidden;
    }
    .file_input input{
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        z-index: 99;
        opacity: 0;
    }
    .verify_info p{
        font-size: 12.8px;
        color: #333;
        line-height: 36px;
        padding: 0 16px;
    }

    .yzm {
        position: absolute;
        top: -8px;
        right: -40px;
        width: 50%;
        padding: 8px 0px;
        text-align: center;
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
    }
</style>



<div class="pro_header">
    <a href="javascript:history.go(-1)" class="return_btn"></a>
    <?= $this->title ?>
    <a href="<?= url(['site/index']) ?>" class="to_home_btn"></a>
</div>
<?php if(!empty($userAccount) && $userAccount->state == 1): ?>
<div class="verify_info">
    <p>开户银行： <?= $userAccount->bank_name ?></p>
    <p>银行卡号： <?= $userAccount->bank_card ?></p>
    <p>银行预留手机： <?= $userAccount->bank_mobile ?></p>
    <p>持卡人姓名： <?= $userAccount->bank_user ?></p>
    <p>身份证号： <?= $userAccount->id_card ?></p>
    <p>开户行地址： <?= $userAccount->bank_address ?></p>
</div>
<?php else: ?>
<?php $form = self::beginForm(['showLabel' => false, "class" => "transferIntForm"]) ?>
    <div class="tr_form_group clear_fl">
        <span class="lf">开户银行：</span>
        <?php $userAccount->bank_name = $userAccount->bank_code ?>
        <?= $form->field($userAccount, 'bank_name')->dropDownlist('', ["class" => ""]) ?>
    </div>
    <div class="tr_form_group clear_fl">
        <span class="lf">银行卡号：</span>
        <?= $form->field($userAccount, 'bank_card')->textInput(['placeholder' => '请输入银行卡号', "class" => ""]) ?>
    </div>
    <div class="tr_form_group clear_fl">
        <span class="lf">银行预留手机：</span>
        <?= $form->field($userAccount, 'bank_mobile')->textInput(['placeholder' => '请输入银行预留手机号', "class" => ""]) ?>
    </div>
    <div class="tr_form_group clear_fl">
        <span class="lf">持卡人姓名：</span>
        <?= $form->field($userAccount, 'bank_user')->textInput(['placeholder' => '请输入持卡人姓名', "class" => ""]) ?>
    </div>
    <div class="tr_form_group clear_fl">
        <span class="lf">身份证号：</span>
        <?= $form->field($userAccount, 'id_card')->textInput(['placeholder' => '请输入身份证号', "class" => ""]) ?>
    </div>
    <div class="tr_form_group clear_fl">
        <span class="lf">开户行地址：</span>
        <?= $form->field($userAccount, 'bank_address')->textInput(['placeholder' => '请输入开户行地址', "class" => ""]) ?>
    </div>
    <div class="tr_form_group clear_fl has_get">
        <span class="lf">验证码</span>
        <?= $form->field($model, 'verifyCode')->textInput(['placeholder' => '请输入手机验证码', 'class' => ''])  ?>
        <span class="get_btn yzm" data-action="<?= url(['site/verifyCode']) ?>">获取验证码</span>
    </div>
    <?= $form->field($model, 'mobile')->hiddenInput(['class' => 'user-mobile'])  ?>
    <button type="button" id="submitBtn" class="confirm_btn">提交</button>
<?php self::endForm() ?>
<?php endif ?>

<!-- 验证完成后为一下内容 -->
<!--<div class="verify_info">
    <p>姓名： 马彪</p>
    <p>银行卡号： 62155656546565656</p>
    <p>开户银行： 建设银行</p>
</div>
-->
<script>
    $(function () {
        //提交
        $("#submitBtn").click(function () {
            if ($(this).hasClass('disabled')) {
                return false;
            }
            $("form").ajaxSubmit($.config('ajaxSubmit', {
                success: function (msg) {
                    if (!msg.state) {
                        $.alert(msg.info);
                    } else {
                        $.alert("信息提交成功！");
                        setTimeout(function(){
                            window.location.href = msg.info;
                        }, 1000);
                    }
                }
            }));
            return false;
        });
        // 验证码
        $(".get_btn").click(function () {
            if ($(this).hasClass('disabled')) {
                return false;
            }
            var mobile = $('.user-mobile').val();
            var url = $(this).data('action');
            if (mobile.length != 11) {
                $.alert('您输入的不是一个手机号！');
                return false;
            }
            $.post(url, {mobile: mobile}, function(msg) {
                if (msg.state) {
                    $.alert(msg.info);
                } else {
                    $.alert(msg.info);
                }
            }, 'json');
        });
    });
</script>




